<div class="main" style="clear:both;position: relative;">

<!-- Container-->

<?php 
 $this->load->view('layouts/sidebar');
$title = $this->_global->_unserialize($posts->post_title);
$seo_title =$this->_global->_unserialize($posts->seo_title);
$seo_title=isset($seo_title[$this->session->userdata('lan')])?$seo_title[$this->session->userdata('lan')]['seo_title']:"";

$desc  = $this->_global->_unserialize($posts->post_desc);
$content = $this->_global->_unserialize($posts->post_content);
$al = $this->_global->_unserialize($posts->seo_alias);
if(!empty($al[$this->session->userdata('lan')])){
if($alias != $al[$this->session->userdata('lan')]['alias']){
    redirect('news/c'.$posts->cat_id.'/'.$posts->post_id.'-'.$al[$this->session->userdata('lan')]['alias']);
    }
}
else{
echo "Vui lòng nhập nội dung bài viết tương ứng với ngôn ngữ hiện tại";
}
   global $site_info;
$site_info['site_title']= $seo_title.' - '.$site_info['site_title'];
?>
<div class="content" style="position: relative;">
<h1 class="title"><?php echo isset($title[$this->session->userdata('lan')])?$title[$this->session->userdata('lan')]['post_title']:"Không tồn tại tiêu đề bài viết với ngôn ngữ hiện tại"; ?><!-- Place this tag where you want the +1 button to render -->
<span></span>
</h1>
<p>
<?php 
 $user = $this->users->get_user(array('user_id'=>$posts->user_id));
 printf($this->lang->line('posted_by'),$user[0]->username,mdate($site_info['date_format'],$posts->post_date)) ?><br /><a style="position: relative;top: -2px;" name="fb_share" type="icon" share_url="<?php echo base_url().$this->uri->uri_string() ?>" title="Share with Facebook"></a> 
</p>
<!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_default_style ">
<a class="addthis_button_preferred_1"></a>
<a class="addthis_button_preferred_2"></a>
<a class="addthis_button_preferred_3"></a>
<a class="addthis_button_preferred_4"></a>
<a class="addthis_button_compact"></a>
<a class="addthis_counter addthis_bubble_style"></a>
</div>
<!-- AddThis Button END -->
<ul id="tagline">
    <li class="tags-icon">Tags:</li>
    <li>
        <?php $tags = $posts->tagline;
            if($tags!=''){
                $tags = explode(',',$tags);
                foreach($tags as $tag){
                    echo anchor('tags/'._set_alias($tag),$tag,'title="'.$tag.'"').',';
                }
            }
        ?>
    </li>
    
</ul>
<h2 class="clear"></h2>

<?php $img = isset($desc[$this->session->userdata('lan')])?$desc[$this->session->userdata('lan')]['post_desc']:""; 
?>
<p><img src="<?php echo $this->config->item('cdn_url') ?>exec/timthumb.php?src=<?php echo _get_thumbnail($img)?>&w=638"/></p>

<?php 
echo $content[$this->session->userdata('lan')]['post_content'];
unset($posts);
?>
<div class="shadow-box"></div>
<?php echo _get_next_article($this->uri->rsegment(5));
echo _get_prev_article($this->uri->rsegment(5));
 ?>
   
</div>
    </div>
    
<div class="clear"></div>
<!--End Contaier--> 
